package com.ruoyi.trainingManagement.domain.Vo;

import com.ruoyi.trainingManagement.domain.TrainingCredit;
import com.ruoyi.trainingManagement.domain.TrainingProgramSubject;
import com.ruoyi.trainingManagement.domain.trainingProgram;
import com.ruoyi.trainingManagement.domain.trainingProgramCourses;

import jakarta.validation.Valid;
import jakarta.validation.constraints.NotNull;
import java.util.List;

public class TrainingProgramWithCoursesDTO {
    @Valid // 在嵌套的 trainingProgram 对象上启用验证（如果它有注解）
    @NotNull(message = "培养方案信息不能为空") // 确保 program 对象本身不为 null
    private trainingProgram program;

    private TrainingCredit credit;

    // 可选：如果需要，为列表本身或其元素添加验证
    // 例如, @Size(min = 1, message = "至少需要一个课程")
    private List<trainingProgramCourses> courses;

    private List<TrainingProgramSubject> disciplinesData;
    // --- Getters 和 Setters ---

    public trainingProgram getProgram() {
        return program;
    }

    public void setProgram(trainingProgram program) {
        this.program = program;
    }

    public List<trainingProgramCourses> getCourses() {
        return courses;
    }

    public void setCourses(List<trainingProgramCourses> courses) {
        this.courses = courses;
    }

    public List<TrainingProgramSubject> getDisciplinesData() {
        return disciplinesData;
    }

    public void setDisciplinesData(List<TrainingProgramSubject> disciplinesData) {
        this.disciplinesData = disciplinesData;
    }
    @Override
    public String toString() {
        return "TrainingProgramWithCoursesDTO{" +
                "program=" + program +
                ", credit=" + credit +
                ", courses=" + courses +
                ", subjects=" + disciplinesData +
                '}';
    }

    public TrainingCredit getCredit() {
        return credit;
    }

    public void setCredit(TrainingCredit credit) {
        this.credit = credit;
    }
}
